// 接口返回数据类型
export interface ResData {
  code: number,
  msg:string
}

// 表格单行数据类型
export interface Menu {
  active:number
  createTime:string,
  createUser:string,
  deleted:number,
  id?:number,
  menuIcon:string,
  menuId:string,
  menuName:number,
  menuUrl:string,
  parentId:number,
  sort:number,
  updateTime:string,
  updateUser:string,
  version:number,
  children?: childrenMenu
}

export type childrenMenu = Menu[]

// 全部返回数据类型
export interface MenuResData extends ResData{
  data:{
    records:Menu[],
    current:number,
    pages:number,
    size:number,
    total:number,
  }
}

//添加与修改菜单携带参数的ts类型
export interface MenuParams {
  id?: number|string //ID
  parentId: number //父id
  menuId: string //菜单项
  menuName: string  //菜单项名称
  menuUrl: string  //路由路径
  menuIcon: string //菜单图标
}